package com.derbysoft.synxisadapter.dswitch2.service.impl;

import com.derbysoft.remote.dswitch.core.GenericRQ;
import com.derbysoft.remote.dswitch.core.GenericRS;
import com.derbysoft.remote.dswitch.hotel.adapter.hotelprovider.HotelProviderWebService;
import com.derbysoft.remote.dswitch.hotel.dto.*;
import com.derbysoft.remote.dswitch.hotel.dto.sync.availstatuschange.SyncAvailStatusChangeRQ;
import com.derbysoft.remote.dswitch.hotel.dto.sync.availstatuschange.SyncAvailStatusChangeRS;
import com.derbysoft.remote.dswitch.hotel.dto.sync.ratechange.SyncRateChangeRQ;
import com.derbysoft.remote.dswitch.hotel.dto.sync.ratechange.SyncRateChangeRS;
import com.derbysoft.remote.dswitch.hotel.dto.sync.rateplanchange.SyncRatePlanChangeRQ;
import com.derbysoft.remote.dswitch.hotel.dto.sync.rateplanchange.SyncRatePlanChangeRS;
import com.derbysoft.synxisadapter.dswitch2.service.HotelProviderService;

public abstract class AbstractHotelProviderWebService implements HotelProviderWebService {

    private HotelProviderService<GenericRQ, GenericRS> unsupportHotelProviderService;

    public GenericRS<HotelRateRangeRS> getRateRange(GenericRQ<HotelRateRangeRQ> rq) {
        return unsupportHotelProviderService.invoke(rq);
    }

    @Override
    public GenericRS<QueryReservationTransactionStatusRS> queryReservationTransactionStatus(
            GenericRQ<QueryReservationTransactionStatusRQ> rq) {
        return unsupportHotelProviderService.invoke(rq);
    }

    public GenericRS<HotelMultiRateRangeRS> getMultiRateRange(GenericRQ<HotelMultiRateRangeRQ> rq) {
        return unsupportHotelProviderService.invoke(rq);
    }

    public GenericRS<HotelAvailRS> getAvailability(GenericRQ<HotelAvailRQ> rq) {
        return unsupportHotelProviderService.invoke(rq);
    }

    public GenericRS<HotelMultiAvailRS> getMultiAvailability(GenericRQ<HotelMultiAvailRQ> rq) {
        return unsupportHotelProviderService.invoke(rq);
    }

    public GenericRS<HotelReservationRS> makeReservation(GenericRQ<HotelReservationRQ> rq) {
        return unsupportHotelProviderService.invoke(rq);
    }

    public GenericRS<HotelReservationNotifyRS> notifyReservation(GenericRQ<HotelReservationNotifyRQ> rq) {
        return unsupportHotelProviderService.invoke(rq);
    }

    public GenericRS<CancelRS> cancelReservation(GenericRQ<CancelRQ> rq) {
        return unsupportHotelProviderService.invoke(rq);
    }

    public GenericRS<CancelNotifyRS> notifyCancel(GenericRQ<CancelNotifyRQ> rq) {
        return unsupportHotelProviderService.invoke(rq);
    }

    public GenericRS<QueryHotelReservationAuditRS> query(GenericRQ<QueryHotelReservationAuditRQ> rq) {
        return unsupportHotelProviderService.invoke(rq);
    }


    @Override
    public GenericRS<SyncAvailStatusChangeRS> syncAvailStatusChange(GenericRQ<SyncAvailStatusChangeRQ> rq) {
        return unsupportHotelProviderService.invoke(rq);
    }

    @Override
    public GenericRS<SyncRateChangeRS> syncRateChange(GenericRQ<SyncRateChangeRQ> rq) {
        return unsupportHotelProviderService.invoke(rq);
    }

    @Override
    public GenericRS<SyncRatePlanChangeRS> syncRatePlanChange(GenericRQ<SyncRatePlanChangeRQ> rq) {
        return unsupportHotelProviderService.invoke(rq);
    }

    public void setUnsupportHotelProviderService(HotelProviderService<GenericRQ, GenericRS> unsupportHotelProviderService) {
        this.unsupportHotelProviderService = unsupportHotelProviderService;
    }
}
